//
//  AddCityCell.m
//  UIA段项目 墨家天气
//
//  Created by dllo on 15/8/23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "AddCityCell.h"

@implementation AddCityCell
-(void)dealloc{
   
    [_cityName release];
    [_high release];
    [_low release];
    [_sky release];

    [_to release];
    [_leftDu release];
    [_rightDu release];
     [super dealloc];
    

}
- (instancetype)initWithFrame:(CGRect)frame
{
    
    
    
    self = [super initWithFrame:frame];
    if (self) {
        
        
        self.cityName = [[UILabel alloc]init];
        self.cityName.font = [UIFont systemFontOfSize:17 * OffWidth];
        self.cityName.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_cityName];
        self.cityName.textAlignment = 1;
        [_cityName release];
        
        
        self.high = [[UILabel alloc]init];
        self.high.font = [UIFont systemFontOfSize:17 * OffWidth];
        self.high.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_high];
        [_high release];
        
        self.low = [[UILabel alloc]init];
        self.low.font = [UIFont systemFontOfSize:17 * OffWidth];
        self.low.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_low];
        [_low release];
        
        self.sky = [[UILabel alloc]init];
        self.sky.textColor = [UIColor whiteColor];
        self.sky.font = [UIFont boldSystemFontOfSize:18 * OffWidth];
        self.sky.textAlignment = 1;
        self.sky.layer.masksToBounds = YES;
        [self.contentView addSubview:_sky];
        [_sky release];
        
        
               
        
        self.to = [[UILabel alloc]init];
        self.to.textColor = [UIColor whiteColor];
        self.to.text = @"~";
        [self.contentView addSubview:_to];
        [_to release];
        
        
        self.leftDu = [[UILabel alloc]init];
        self.leftDu.textColor = [UIColor whiteColor];
        self.leftDu.text = @"。";
        [self.contentView addSubview:_leftDu];
        [_leftDu release];
        
        self.rightDu = [[UILabel alloc]init];
        self.rightDu.textColor = [UIColor whiteColor];
        self.rightDu.text = @"。";
        [self.contentView addSubview:_rightDu];
        [_rightDu release];
        
    }
    
    return self;
}


- (void)layoutSubviews
{
    
    [super layoutSubviews];
    
    self.cityName.frame = CGRectMake(0, 0, self.contentView.frame.size.width, 50 * OffHeight);
    self.high.frame = CGRectMake(70 * OffWidth, self.contentView.frame.size.height - 50 * OffHeight, 30 * OffWidth, 30 *OffHeight);
    self.low.frame = CGRectMake(20 * OffWidth, self.contentView.frame.size.height - 50 * OffHeight, 30 * OffWidth, 30 * OffHeight);
    self.sky.frame = CGRectMake(0, self.contentView.frame.size.height - 80 * OffHeight, self.contentView.frame.size.width, 30 * OffHeight);
    self.to.frame = CGRectMake(50 * OffWidth, self.contentView.frame.size.height - 50 * OffHeight, 30 * OffWidth, 30 * OffHeight);
    self.leftDu.frame = CGRectMake(35 * OffWidth, self.contentView.frame.size.height - 52 * OffHeight, 10 * OffWidth, 10 * OffHeight);
    self.rightDu.frame = CGRectMake(87 * OffWidth, self.contentView.frame.size.height - 52 *OffWidth, 10 * OffWidth, 10 * OffHeight);

}
@end
